{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Matplotlib绘制散点图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAD8CAYAAACcjGjIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAFbJJREFUeJzt3X2QZXWd3/H3x+5hHGF4mmmmgAEGV6pW4iKyLeDKg2BEQYtRtHZJQlBqU7NkScpNxTJSbrIrKcu4y24MZUWKKLtBF93E7FQmrsIQHhaSiNojwwCL4ICzwgxhGpFBhAVpvvnjnjbXPt3Mne7T0z3s+1V16577+/3Oud975tz7mfNwb6eqkCSp36sWugBJ0uJjOEiSWgwHSVKL4SBJajEcJEkthoMkqcVwkCS1GA6SpBbDQZLUMrzQBUy1cuXKWrNmzUKXIUn7lE2bNj1RVSNdLW/RhcOaNWsYGxtb6DIkaZ+S5G+6XJ6HlSRJLYaDJKnFcJAktRgOkqQWw0GS1GI4SJJaDAdJUovhIElqMRwkSS2GgySpxXCQJLUYDpKkloHCIcm2JPck2Zyk9at46bkqydYkW5Kc1LQfk+S7zXz3Jbm06xcgSerenvwq61lV9cQMfecCxzW3U4DPNfePAW+pqueTHADcm2RDVe2YS9GSpPnV1WGltcB11XMncHCSw6vqhap6vhmztMPnkyTNo0E/rAvYmGRTknXT9B8JPNL3+NGmjSRHJdnS9H/avQZJWvwGDYfTquokeoePLktyxqBPUFWPVNUJwOuADyZZNXVMknVJxpKMjY+PD7poSdI8GSgcqmp7c78TWA+cPGXIduCovserm7b+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7rZPsiq/EW4J6m/Us0VyAsYJ13AH9N73j/2/vaVwA3A9+nd3XQoYu0zi8263MLvTfH4XOo8QR6h7K2NP8+/6ZpvwI4v5l+dbNtbW22tdf2zf9xelf/PEDfVR/N63yw6ft4B++fzuuk9965u7ndt0jq3AY8CTxD73j48U37aLO8h4DP0nxxd7HUSO8qpk3NMu8D/gPNFWELUSfwu/R+1Xpz3+2w2axLvyEtSWrxG9KSpBbDQZLUYjhIkloMB0lSi+EgSWoxHCRJLYaDJKnFcJAktfw/6s5pNixHd+4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# s为标记符的大小\n",
    "# color      r-red  g-green b-blue   k-black    y-yellow    c-cyan    十六进制  #ff0000\n",
    "# alpha 透明度    0-1之间，1位不透明\n",
    "# marker 标记符号      o  *  x  +  .  d  D   h  \n",
    "\n",
    "# 以上4个均为可选项\n",
    "plt.scatter(3, 5, s=200, color='c', alpha=0.5, marker='h')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAD8CAYAAABXe05zAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAEJZJREFUeJzt3X+QVfV9xvHn2R/ALogo3FpglZXR0Rg1SO9QrJ2M0ZKxjQN/aKdUSWqmhkzr1Gg6OrWxzZjJOJm0xrRJpkq1HdHEGKlaYzQTMjpj7SRkFsQGhVpEDCDCRUVhl1/LfvrHvSCuu3vPyrk/vuv7NbPj3Xu+nH2+HPfh7Peeu8cRIQBAOloaHQAAMDoUNwAkhuIGgMRQ3ACQGIobABJDcQN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vP/m/1xXfNZoScAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = [1, 2, 3, 4]\n",
    "y = [2, 3, 4, 8]\n",
    "plt.scatter(x, y, s=[20, 40, 80, 300], color=['r', 'g', 'b', 'y'])\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[7, 5],\n",
       "       [6, 6],\n",
       "       [8, 9],\n",
       "       [7, 1],\n",
       "       [4, 2],\n",
       "       [2, 6],\n",
       "       [3, 6],\n",
       "       [9, 9],\n",
       "       [3, 5],\n",
       "       [6, 3]])"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x1 = np.random.randint(1, 10, size=(10, 2))\n",
    "x2 = np.random.randint(1, 10, size=(10, 2))\n",
    "x1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAD8CAYAAABXe05zAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAEThJREFUeJzt3WFsG+d9x/Hfn5aG5OyNKRptSJ2I177JFtRYkhFd2mx5EbXD2kbpsFcZmALbG2520NndkKKd3tQvOGBYUWhvIuCQYCvQa4LOSV+oKIIMbjBsL+aBcrIpiYNha0U2brqowKbU4YAo7n8vjmkjW5RImce7h/5+AIPi4/PdDwfyp9PziD5zdwEAwlEpOgAAYDQUNwAEhuIGgMBQ3AAQGIobAAJDcQNAYChuAAgMxQ0AgaG4ASAwM3ns9Oabb/Y4jvPYNQBMpbW1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f1y/3Fe2fz2NyZx3JlJHGRE90r6rKT1/tyxJP2Fu3+nwEyD3CLpa/1V+oqkb7p7qX/VLgC/Iulb2XtWM5K+4e7PFhtpT5+TlPanIL4n6Y8KzjNQ/xvhJyT9cdFZBnH3c2Z2RtJ5Se9IekHl/gTl02b2fknbkh6Z1OJ06X4dEACwt9JNlQAA9kZxA0BgKG4ACAzFDQCBobgBIDAUNwAEhuIGgMBQ3AAQmP8H+gpIrM1gSPwAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x1[:,0], x1[:,1], color='r')\n",
    "plt.scatter(x2[:,0], x2[:,1], color='g')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "X = np.loadtxt('X_height.txt')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[  1. ,  75. ],\n",
       "       [  2. ,  87.2],\n",
       "       [  3. ,  95.6],\n",
       "       [  4. , 103.1],\n",
       "       [  5. , 110.2],\n",
       "       [  6. , 116.6],\n",
       "       [  7. , 122.5],\n",
       "       [  8. , 128.5],\n",
       "       [  9. , 134.1],\n",
       "       [ 10. , 140.1],\n",
       "       [ 11. , 146.6],\n",
       "       [ 12. , 152.4],\n",
       "       [ 13. , 156.3],\n",
       "       [ 14. , 158.6],\n",
       "       [ 15. , 159.8],\n",
       "       [ 16. , 160.1],\n",
       "       [ 17. , 160.3],\n",
       "       [ 18. , 160. ],\n",
       "       [  1. ,  76.5],\n",
       "       [  2. ,  88.5],\n",
       "       [  3. ,  96.8],\n",
       "       [  4. , 104.1],\n",
       "       [  5. , 111.3],\n",
       "       [  6. , 117.7],\n",
       "       [  7. , 124. ],\n",
       "       [  8. , 130. ],\n",
       "       [  9. , 135.4],\n",
       "       [ 10. , 140.2],\n",
       "       [ 11. , 145.3],\n",
       "       [ 12. , 151.9],\n",
       "       [ 13. , 159.5],\n",
       "       [ 14. , 165.9],\n",
       "       [ 15. , 169.8],\n",
       "       [ 16. , 171.6],\n",
       "       [ 17. , 172.3],\n",
       "       [ 18. , 172.7]])"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n",
       "       0., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,\n",
       "       1., 1.])"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y = np.concatenate([np.zeros(18), np.ones(18)])\n",
    "y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 76.5,  88.5,  96.8, 104.1, 111.3, 117.7, 124. , 130. , 135.4,\n",
       "       140.2, 145.3, 151.9, 159.5, 165.9, 169.8, 171.6, 172.3, 172.7])"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X[y==1, 1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAEEJJREFUeJzt3X2MZXV9x/H3p65otUbAXSnuYhcsmqipdDMltFU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dAT7a99w3dOfwQeD1E6z3IL317GPn8LEr2p4B3LDUuTOhev+pOzfvoBfepy+st3t8XI5Mot5ufO+xc7Zv7sSPb/+X74yVpMb5YqwkNc6gl6TGGfSS1DiDXpIaZ9BLUuMMeklqnEEvSY0z6CWpcf8LrK8vf/URAIgAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X[y==0, 0], X[y==0, 1], color='r', marker='_')\n",
    "plt.scatter(X[y==1, 0], X[y==1, 1], color='g', marker='_')\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
